import request from '@/utils/request';

export const PttowntalkList = (data) =>
	request({
		url: '/towntalk',
		method: 'POST',
		data,
	});
export const GttowntalkList = (params) =>
	request({
		url: '/towntalk',
		params,
	});

//删除列表
export const DetowntalkList = (id) =>
	request({
		url: `/towntalk/${id}`,
		method: 'DELETE',
	});

//提交标签表
export const addlabel = (data) =>
	request({
		method: 'POST',
		url: '/ht_label',
		data,
	});

//获取标签列表
export const Getlabel = (params) =>
	request({
		url: '/ht_label',
		params
	});

//删除标签
export const deletlabel = (id) =>
	request({
        method: 'DELETE',
		url: `/ht_label/${id}`,
	});

//根据条件搜索
export const addCondition = (params) =>
	request({
		url: '/towntalk',
		params,
	});
	//修改标签
export const putlabel = (data) =>
request({
	url: `/ht_label/${data.id}`,
	method:'PUT',
	data,
	});
	// 获取评论
export const getComment = () => request({
	url: '/comment'
  })
